<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="/EmergencySystem/javax.faces.resource/css/gooeymenu.css.faces" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
        <script src="/EmergencySystem/javax.faces.resource/js/gooeymenu.js.faces"></script>
        <title><ui:insert name="title">Default Title</ui:insert></title>
        <h:outputStylesheet name="css/jsfcrud_1.css"/>
    </h:head>
    <center>
        <h:body>
            <br/>
            <ul id="gooeymenu4" class="framemenu">
                <h:form>
                    <li>
                        <h:commandLink action="#{announceController.prepareList}" value="Announce" immediate="true"/>
                    </li>
                    <c:if test="#{sessionScope.user==false}"> 
                        <li>
                            <h:commandLink action="#{propertyController.prepareList}" value="Property" immediate="true"/>
                        </li>
                    </c:if>
                    <li>
                        <h:commandLink action="#{offerController.prepareList}" value="Offer" />
                    </li>
                    <c:if test="#{sessionScope.owner==false}"> 
                        <li>
                            <h:commandLink action="#{clientController.prepareList}" value="Client"/>
                        </li>
                    </c:if>    
                    <c:if test="#{sessionScope.agent==true}"> 
                        <li>
                            <h:commandLink action="#{agentController.prepareList}" value="Agent"/>
                        </li>
                    </c:if>    
                    <c:if test="#{sessionScope.agent==true || sessionScope.owner==true}"> 
                        <li>
                            <h:commandLink action="#{ownerController.prepareList}" value="Owner"/>
                        </li>
                    </c:if>
                    <c:if test="#{sessionScope.agent==true || sessionScope.owner==true}"> 
                        <li>
                            <h:commandLink action="/index" value="admin"/>
                        </li>
                    </c:if>

                    <li>
                        <h:commandLink action="#{userController.doLogout}" value="logout"/>
                    </li>
                </h:form>
            </ul>
            <script>
            gooeymenu.setup({id:'gooeymenu4', snapdelay:500})
            </script>
            <br/>
            <h1>

                <ui:insert name="title">Default Title</ui:insert>
            </h1>
            <p>
                <ui:insert name="body">Default Body</ui:insert>
            </p>
        </h:body>
    </center>
</html>
